package edu.tgc.repository.student;

import java.util.List;
import java.util.UUID;

import org.abyss.common.repository.CommonRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import edu.tgc.entity.student.TbClass;
import edu.tgc.entity.system.SysDept;
@Repository
public interface TbClassRepository extends CommonRepository<TbClass, UUID> {

	public List<TbClass> findByIsUsed(boolean b);
	
	//@Query(value="select distinct t.parentdept from TbClass t where t.isUsed=?1 order by t.parentdept.sort")
	public List<TbClass> findDistinctParentdeptByIsUsedOrderByParentdeptSort(boolean b);
	
	public List<TbClass> findByParentdeptAndIsUsed(SysDept dept, boolean b);

	public TbClass findByName(String name);

	public List<TbClass> findByManagerId(UUID sysuserId);

}
